package cn.codeforfun.stream.receive;

import cn.codeforfun.stream.config.Barista;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

/**
 * Package cn.codeforfun.receive
 * Project springclouddemo
 * Company  PACTERA
 * Author bin.wang
 * Created on 2017/3/10 10:59
 * version 1.0.0
 */
@Component
public class Receiver {
  @StreamListener(Barista.OUTPUT_CHANNEL)
  public void receive(Message message) {
    Object payload = message.getPayload();
    System.out.println(payload.toString());
  }
}
